<include file="public@meta" />

<body>
<div class="layui-fluid">
	<div class="layui-card-body">
		<form method="post" action="{:url('add')}" class="layui-form">
			<div class="layui-form-item">
				<label class="layui-form-label">名称<span class="form-required">*</span></label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="name" lay-verify="required" lay-verType="tips" placeholder="请输入相册名称">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">英文标识<span class="form-required">*</span></label>
				<div class="layui-input-inline">
					<input type="text" class="layui-input" name="idname" lay-verify="required" lay-verType="tips" placeholder="请输入相册英文标识">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-block">
					<textarea class="layui-textarea" name="remark" placeholder="您可以输入简短的备注"></textarea>
				</div>
			</div>
			<div class="layui-form-item layui-hide">
				<input type="button" lay-submit lay-filter="layui-btn-form-submit" id="layui-btn-form-submit" value="确认添加">
				<input type="button" lay-submit lay-filter="layui-btn-form-edit" id="layui-btn-form-edit" value="确认编辑">
			</div>
		</form>
	</div>
</div>

<script>
	layui.config({
		base: '__STATIC__/layuiadmin/' //静态资源所在路径
	}).extend({
		index: 'lib/index', //主入口模块
		layCenter: 'lib/layCenter', //主入口模块
	}).use(['index', 'form','layCenter','common'], function(){
		var $ = layui.$,
				form = layui.form,
				layCenter = layui.layCenter,
				common = layui.common;
		//监听提交
		form.on('submit(layui-btn-form-submit)', function(data){
			layCenter.FormSubmit("{:url('add')}",data.field,true);
		});

	});
</script>
</body>
</html>